package com.mavenq.fly.utils.excelv4.processor;

import com.mavenq.fly.utils.excelv4.model.PageReadResult;

import java.util.List;

/**
 * 分页数据处理接口
 */
public interface PageDataProcessor<T> {
    boolean processPage(List<T> data, PageReadResult<T> pageInfo);
    default void onComplete(long totalRows, long successRows, long errorRows) {}
    default void onError(Exception error) {
        System.err.println("分页处理发生错误: " + error.getMessage());
        error.printStackTrace();
    }
}